#pragma once

#include <windows.h>
#include <stdlib.h>
#include <iostream>
#include "DialogsResource.h"

namespace{
	const int MAX_PATH_SIZE = 255;
}

class Dialogs
{
private:
	HWND _parentHandler, _myHandler;
	HINSTANCE _inst;
	bool _success;
	WCHAR* _text;
	WCHAR _path[MAX_PATH_SIZE];
public:
	Dialogs(HWND parent = 0, HINSTANCE instance = 0);
	virtual ~Dialogs(void);

	void Init(HWND parent, HINSTANCE instance);

	bool GetFloatValue(WCHAR* text = NULL);
	bool GetFloatVector3(WCHAR* text = NULL);
	bool GetFloatVector4(WCHAR* text = NULL);
	
	bool OpenFileDialog(WCHAR* ext);

	static void CALLBACK WndValueProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
	static void CALLBACK WndVector3Proc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
	static void CALLBACK WndVector4Proc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);

	LRESULT OnWndValueProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
};
